package com.shopping.mall.auth.VO;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Null;
import javax.validation.constraints.Pattern;
import javax.validation.groups.Default;
import java.sql.Timestamp;

/**
 * @Author ZZY
 * @Date 2021/8/4
 */
@Data
public class EnterpriseVo {

    public interface apply extends Default {
    }

    @ApiModelProperty(value="用户ID")
    @Null(groups = {apply.class})
    private String id;

    @ApiModelProperty(value="姓名")
    private String name;

    @ApiModelProperty(value="岗位")
    private String job;

    @ApiModelProperty(value="身份证号码")
    @Pattern(groups = {apply.class}, regexp = "^[1-9]\\d{5}(18|19|20|(3\\d))\\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$",message = "不满足18位身份证号")
    private String id_card;

    @ApiModelProperty(value="出生日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp birthday;

    @ApiModelProperty(value="性别(1男2女)")
    private Integer gender;

    @ApiModelProperty(value="地址")
    private String place;

    @ApiModelProperty(value="民族")
    private String nation;

    @ApiModelProperty(value="证件照")
    private String identification_photo;

    @ApiModelProperty(value="受教育程度")
    private String degree_of_education;

    @ApiModelProperty(value="联系电话")
    private String phone;

    @ApiModelProperty(value="身体健康状况")
    private String health_condition;

    @ApiModelProperty(value="用户状态(0审核中,1已通过,-1未通过)")
    @Null(groups = {apply.class})
    private Integer status;
}
